Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • C:\Users\AppData\Local\Temp\ST_04000001.tmp * *not found

    I´m converting spss files into .dta files through many loops and one of those is like the following (the other ones only change the name of the spss file)

    cd "$directorio/`i'/`i'-Modulo238";
    usespss 10_IVCENAGRO_REC05.sav;
    save 238, replace;
    erase 10_IVCENAGRO_REC05.sav;

    and after runnings it, the error on the title appears:

    file
    C:\Users\AppData\Local\Temp\ST_04000001.tmp
    not found
    r(601);


    I tried searching manually the file ST_04000001.tmp but it indeed does not exist.

    I thank in advance your responses and any possible solutions.

  • #2
    Cross-posted https://stackoverflow.com/questions/...-tmp-not-found

    Comment


    • #3
      First, if you are using Stata 16, read the output of help import spss for an alternative approach to this task. I don't think that's the case, but I need to include the advice here for anyone who later is searching Statalist for information on reading SPSS data.

      If you are not using Stata 16, what version are you using? Run the about command and post the first lines of its output.
      Code:
      . about
      
      Stata/SE 16.0 for Mac (64-bit Intel)
      Revision 11 Dec 2019
      Is the dataset that failed the first one you were looping over, or had other datasets been successfully converted before this one failed?

      Is that the only error message you received, or was it preceded by any other unusual messages?

      Having looked at the ado files for usespss I see that it first creates a temporary dataset containing the converted SPSS data, so it is possible that something went wrong with that process - perhaps that SPSS input file has a problem - and the temporary dataset was not created.

      So if your program has already converted several SPSS datasets, perhaps you need to rerun it, starting your loop with the dataset after the one that failed.

      And perhaps Sergiy Radyakin - the author of usespss and a frequent contributor to Statalist - will see this and be able to offer further advice.

      Comment


      • #4
        -usespss- is written on reverse-engineering efforts. It is not clear whether StataCorp has gotten the proprietary file specification from the SPSS, but since it is part of the official Stata distribution, any issues with such import, I believe will be quickly detected and fixed. Note however, we are talking here serious file formats here. Concluding this, use the official Stata command first if you have Stata 16 or newer.

        If you don't have access to Stata 16, be aware that -usespss- has a bunch of limitations. It was written more than 10 years ago, when both SPSS and I were younger. At that time, I didn't have gray hair, and SPSS didn't have encryption, serious compression, and a bunch of other features in files introduced since then.

        Most notably, even though -usespss- works with 64-bit Stata (Windows only platform) it is still a 32-bit process - so it is limited in processing large data files.

        I would be curious to see an example of the file where -usespss- breaks, and whether it is anything avoidable or to be avoided, though can't promise any quick solutions.

        If you can't share the file, I would appreciate if you could update this later whether ultimately importing with Stata's built-in import facility was successful.

        Comment

        Working...
        X